<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>lesson 10</title>
</head>
<body>
    <div id="root"></div>
</body>
</html>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const app=Vue.createApp({
        data(){
            return{
                show:true,
            }
        },
        // v-if是通过dom节点来控制元素的显示和隐藏
        // v-if还可以搭配v-else来使用
        // template:`
        // <div v-if="show">Hello world</div>
        // <div v-else>Hello world</div>
        // `
        // v-show是通过css display:none;和display:block;来控制元素的显示和隐藏
        template:`<div v-show="show">Hello world</div>`
    });
    const vm = app.mount('#root')
</script>